<?php

namespace app\admin\controller;

use app\admin\controller\BaseController;
use app\admin\model\Introdution as IntrodutionModel;
use app\admin\model\Introdution;
use think\Request;

class IntrodutionController extends BaseController
{
    public function lst()
    {
        $info = IntrodutionModel::all();
        $this->assign(['info'=>$info]);
        return view();
        }

    public function edi($id)
    {
        if(request()->isPost()){
            $request = Request::instance();
            $param = $request->post();
            //halt($param);
            $re = IntrodutionModel::update($param);
            if($re){
                return $this->success('修改成功','lst','','1');
            }
        }else{
            $info = Introdution::get($id);
            $this->assign(['info'=>$info]);
            return view();
        }


        }
}